﻿@using AmorCanino.Web.Models.Models
@model FullComunication
@{
    string readed = Model.IsReaded ? "" : "notReaded";
    var currentUserId = AmorCanino.Web.Models.Authentication.AuthUser.Current().id;
}

<div class="message-item @readed" data-originId="@Model.Originator" data-targetId="@Model.Target">
    <div style="float:left; padding-left: 5px; padding-top: 5px; margin-right: 5px;"><img src="@Url.Content("~/ImageServices/getProfileThumbnail.pet?uId=" + (currentUserId == Model.Originator ? Model.Target : Model.Originator))" /></div>
    @if (Model.ChatContent.Messages.Count > 0)
    {
    <div class="description-text">
        @Model.ChatContent.Messages[Model.ChatContent.Messages.Count - 1].Message
    </div>
    }
</div>